package cn.qvtu.game;
import cn.qvtu.game.frame.MyFrame;
import javax.swing.JFrame;
public class App extends JFrame
{

    private int width = 1920, height = 1200;

    public App()
    {
        //设置窗体标题
        this.setTitle("DNF");

        //创建一个画布
        GamePanel panel = new GamePanel(width, height);
        //把画布加入到窗体中
        getContentPane().add(panel, "Center");

        //设置窗体大小
        this.setSize(width, height);
        //设置能否调整窗体大小
        this.setResizable(false);
        //这句会使得在屏幕上居中显示
        this.setLocationRelativeTo(null);
        //当关闭窗体的时候退出程序
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        //把窗体显示出来
        this.setVisible(true);
    }
    public static void main(String[] args)
    {
        //创建窗体对象
        App frame = new App();
        System.out.println(" _   _                _        _           _   _   _      \n" +
                "| | | | ___ _ __ ___ (_) ___  | |__   __ _| |_| |_| | ___ \n" +
                "| |_| |/ _ \\ '__/ _ \\| |/ __| | '_ \\ / _` | __| __| |/ _ \\\n" +
                "|  _  |  __/ | | (_) | | (__  | |_) | (_| | |_| |_| |  __/\n" +
                "|_| |_|\\___|_|  \\___/|_|\\___| |_.__/ \\__,_|\\__|\\__|_|\\___|\n" +
                "                                                          ");
    }
}
